/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;

import javax.swing.text.MaskFormatter;

/**
 *
 * @author EDPRADO
 */
public class Mascara extends Exception {
       public MaskFormatter Mascara(String Mascara){  
          MaskFormatter F_Mascara = new MaskFormatter();  
           try{  
               F_Mascara.setMask(Mascara); //Atribui a mascara  
               F_Mascara.setPlaceholderCharacter(' '); //Caracter para preencimento   
           }  
           catch (Exception excecao) {  
           excecao.printStackTrace();  
           }   
           return F_Mascara;  
    }   
    public Mascara(String msg) {
        super(msg);
    }
}
